﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;

namespace spacex.camInterface
{
    /// <summary>
    /// Proxi for the spi storm library
    /// </summary>
    public class StormBrick
    {
        /// <summary>
        /// Creates a connection to the SPI Storm brick
        /// </summary>
        /// <returns></returns>
        public bool Connect()
        {
            try
            {
                spis_CreateInstance();
            }
            catch
            {
                MessageBox.Show("SpiStorm.dll not referenced.");
                return false;
            }
            return false;
        }

        /// <summary>
        /// External method from SPI storm.dll, referenced over DLL import
        /// </summary>
        /// <returns></returns>
        [DllImport(@"C:\pancam\SpiStorm.dll")] 
        static extern int spis_CreateInstance();
    }
}
